#ifndef MYTYPES_H
#define MYTYPES_H

#define LINUX

#include <QString>
#include <QMap>
#include <QFile>
#include <QTextStream>
#include <QDateTime>
#include <QDir>
#include <QVector>

namespace Yzty {
    struct FileCheckCondition;
    extern QString ROOTPW;              //root密码
    extern QString PREMISSPN;           //动态口令
    extern int     LEVEL;               //密级
    extern QString CONFIGPATH;

    typedef int MODECODE;
    typedef int ITEMCODE;

    extern bool DeepCondtionFlag;               //深度检查文件检查标记
    extern bool FileCondtionFlag;               //文件条件选择的标记
    extern bool EmailCondionFlag;               //邮件检查标记
    extern bool VirConditionFlag;               //虚拟机检查标记

    bool VerifyRootPW(const QString& pw);       //管理员密码验证
    bool VerifyPerMission(const QString& premissionnum);    //动态口令

    QTextStream& GetTextSteam(const QString& paths);

    QMap<QString,QString> ConfigParse_Head(const QStringList& text);                               //解析头部
    QMap<int,QPair<QString,QStringList>> ConfigParse_Body(const QStringList& text);           //解析ｂｏｄｙ
    QMap<int,QVector<QPair<QString,QStringList>>> ConfigParse_Struct(const QStringList& text);     //解析ｓｔｒｕｃｔ


    enum class ToolCode{Normal=0,Security,File,Deep,VirMachine,Email,Hard,Report,Total};//功能编号


    //信息基类
    typedef struct BaceInfor
    {
        ToolCode _toolcode;                 //模块编号
        uint16_t _modelindex;               //功能编号

        QString _descripe;

        explicit BaceInfor(ToolCode tcode,uint16_t mcode);

        virtual ~BaceInfor();

        ToolCode GetToolCode();                     //获取功能模块id

        uint16_t GetModelCode();                    //获取小功能模块对应的编号

        virtual QString& GetItem(int itemindex);    //根据功能标号获取信息
        /*
         * 为了兼容上一版，只适用于部分常规检查，其他检查不用编写
        */

    }BaceInfor;


    typedef struct StatusBarInfor{
        QString _corporation;   //版权
        QString _tel;           //联系电话
        QString _cpu;           //处理器信息
        QString _ostype;        //os
        bool    _netflag;       //联网标志
        int     _levelpc;       //密级标志
        QString _user;          //账户名称
        QString _ipaddres;      //ip地址

    }StatusBarInfor;


    extern int ToolMapItemHashCode; //功能转化哈希码
}


// 常规检查类型定义
namespace Yzty
{

    enum class NormalToolCode
    {
        IpAddres=0,     //ip地址信息
        SoftLists,      //软件列表
        MirrorFile,     //镜像文件
        HostInfor,      //主机信息
        HardPart,       //硬盘分区
        PhonePlug,      //手机插拔记录
        NUMS
    };

    struct SystemSoftList:public BaceInfor{
        enum{
            Name=0,
            Version,
            Struct,
            Time,
            Nums
        };
        QVector<QString> _infors;

        explicit SystemSoftList(uint16_t mcode,ToolCode tcode=ToolCode::Normal);
    };

    struct MirrorFile:public BaceInfor{
        enum{
            Name=0, //文件名
            Type,
            Path,
            Size,
            Nums
        };
        QVector<QString> _infors;

        explicit MirrorFile(uint16_t mcode,ToolCode tcode=ToolCode::Normal);
    };

    struct IpAddressInfor:public BaceInfor{
        enum{
            Ip=0,
            Type=1,
            Nums
        };
        QVector<QString> _infors;

        explicit IpAddressInfor(uint16_t mcode,ToolCode tcode=ToolCode::Normal);
    };

    struct HardPartInfor:public BaceInfor{ //硬盘分区信息
        enum{
            Partittion=0,
            Type,
            FileSystem,
            IsEncrypt,
            Total,
            Used,
            Usable,
            Check,
            Decision,
            Nums
        };
        QVector<QString> _infors;
        explicit HardPartInfor(uint16_t mcode,ToolCode tcode=ToolCode::Normal);
    };

    struct PhonePlugInfor:public BaceInfor{ //手机插拔记录
        enum{
            Manufacturer=0,
            Product,
            SerialNumber,
            idVendor,
            idProduct,
            FirstTime,
            LastTime,
            DeciceType,
            DeviceAttech,
            Check,
            decision,
            Nums
        };
        QVector<QString> _infors;
        explicit PhonePlugInfor(uint16_t mcode,ToolCode tcode=ToolCode::Normal);
    };

    struct HostInfoBase{
        QString Item;
        QString Information;
        QString Serialnum;
        QString CheckTip;
    };

    struct ComputerInfo{
        enum{
            CPUNAME=0,
            CPURATE,
            CORENUM,
            LOGICCORENUM,
            MAINBOARD,
            MEMORYINFO,
            MODEL,
            COMPUTERNAME,
            Nums
        };
        static QStringList KeyWords;
        QVector<HostInfoBase> _infors;

        ComputerInfo():_infors(Nums){}
    };

    struct MemoryInfor{
        enum{
            RATE=0,
            MODEL,
            CAPACITY,
            VENDERNAME,
            Nums
        };
        static QStringList KeyWords;
        QVector<HostInfoBase> _infors;

        MemoryInfor():_infors(Nums){}
    };

    struct NetInfor{
        enum{
            NAME=0,
            INFOR,
            DRIVER,
            MAC,
            PREMAC,
            IP,
            DNS,
            GATEWAY,
            Nums
        };
        static QStringList KeyWords;
        QVector<HostInfoBase> _infors;

        NetInfor():_infors(Nums){}
    };

    struct HostInfor:public BaceInfor{
        ComputerInfo *computerinfor;
        QVector<MemoryInfor*> memoryinfors;
        QVector<NetInfor*> netinfors;

        explicit HostInfor(uint16_t mcode,ToolCode tcode=ToolCode::Normal);
    };
}

// 安全检查
namespace Yzty {
    enum class SecurityToolCode{
        SysShare=0,     //系统共享安全
        NetLogin,       //远程登录检查
        SysUpdate,      //系统升级文件
        NetPortInfor,   //系统开放端口
        AccountSec,     //账户安全配置
        PwdConfig,      //密码策略配置
        NetConfig,      //网络安全配置
        SecAudit,       //安全审计配置
        SudoConfig,     //sudo策略配置
        NetFireWall,    //防火墙配置
        SysProcess,     //系统进程信息
        SysServers,     //系统服务信息
        SysKernel,      //系统加载内核
        EmailInfor,     //邮箱客户端
        VirMachine,     //虚拟机安装
        DefendSoft,     //杀毒软件防护
        UserLogin,      //远程
        BroHistory,     //浏览历史,add
        BroCollect,     //收藏夹,add
        BroDownload,    //历史下载信息,add
        BroCookies,
        NUMS
    };

    struct SysShareDirInfor:public BaceInfor	//系统共享安全
    {
        enum{
            SHARENAME=0,
            ROUTE,
            DESCRIP,
            PERM,
            decision,
            NUMS
        };
        /*
        SHARENAME：         共享名称
        ROUTE:              共享路径
        DESCRIP:            共享描述
        PERM:               共享权限
        decision:           判定状态
        */
        QVector<QString> _infors;
        explicit SysShareDirInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct NetLoginInfor:public BaceInfor       //远程登陆检查
    {
        enum{
            FORLOGIN=0,
            STATE,
            DECISION,
            NUMS
        };
        /*
            FORLOGIN:       远程登陆策略
            STATE:          策略状态
            DECISION:       判定状态
        */
        QVector<QString> _infors;
        explicit NetLoginInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct SysUpdateInfor:public BaceInfor      //系统升级文件
    {
        enum{
            UPDATENAME=0,
            UPDATEVER,
            DESCRIP,
            PUBTIME,
            NUMS
        };
        /*
            UPDATENAME:     升级包名称
            UPDATEVER:      升级包版本号
            DESCRIP:        升级包描述
            PUBTIME:        发布时间
        */
        QVector<QString> _infors;
        explicit SysUpdateInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct NetPortInfor:public BaceInfor        //系统开放端口
    {
        enum{
            PROTO=0,
            LOCALIP,
            LOCALPORT,
            FOREIGNIP,
            FOREIGNPORT,
            PORTSTATE,
            PNAME,
            PID,
            DECISION,
            NUMS
        };
        /*
            PROTO:          协议
            LOCALIP:        本地IP
            LOCALPORT:      本地端口
            FOREIGNIP:      远程IP
            FOREIGNPORT:    远程端口
            PORTSTATE:      端口状态
            PNAME:          进程名称
            PID:            进程ID
            DECISION:       判定状态
        */
        QVector<QString> _infors;
        explicit NetPortInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct AccountSecInfor:public BaceInfor     //账户安全配置
    {
        enum{
            ITEMS=0,
            DESCRIP,
            NUMS
        };
        /*
            ITEMS:          项目
            DESCRIP:        描述
        */
        QVector<QString> _infors;
        explicit AccountSecInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct PwdConfigInfor:public BaceInfor      //密码策略配置
    {
        enum{
            ITEMS=0,
            DESCRIP,
            DECISION,
            NUMS
        };
        /*
            ITEMS:          项目
            DESCRIP:        描述
            DECISION:       判定状态
        */
        QVector<QString> _infors;
        explicit PwdConfigInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct NetConfig:public BaceInfor           //网络安全配置
    {
        enum{
            ITEMS=0,
            DESCRIPTION,
            DECISION,
            NUMS
        };
        /*
            ITEMS:          项目
            DESCRIPTION:    描述
            DECISION:       判定状态
        */
        QVector<QString> _infors;
        explicit NetConfig(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct SecAuditInfor:public BaceInfor       //安全审计配置
    {
        enum{
            TYPE=0,
            TACTIC,
            MODE,
            DECISION,
            NUMS
        };
        /*
            TYPE:           类型
            TACTIC:         策略
            MODE:           模式
            DECISION:       判定状态
        */
        QVector<QString> _infors;
        explicit SecAuditInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct SudoConfigInfor:public BaceInfor     //sudo策略配置
    {
        enum{
            TACTIC=0,
            DESCRIPTION,
            DECISION,
            NUMS
        };
        /*
            TACTIC:         策略
            DESCRIPTION:    描述
            DECISION:       判定状态
        */
        QVector<QString> _infors;
        explicit SudoConfigInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct NetFireWallInfor:public BaceInfor    //防火墙配置
    {
        enum{
            ITEMS=0,
            DESCRIPTION=1,
            DECISION=2,
            NUMS
        };
        /*
            ITEMS:          项目
            DESCRIPTION:    描述
            DECISION:       判定状态
        */
        QVector<QString> _infors;
        explicit NetFireWallInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct SysProcessInfor:public BaceInfor		//系统进程信息
     {
        enum {
            NAME=0,
            PID,
            PATH,
            DECISION,
            NUMS
        };
        /*
            NAME:           进程名称
            PID:            进程ID
            PATH:          进程路径
            STATE:          判定状态
        */
        QVector<QString> _infors;
        explicit SysProcessInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct SysServerInfor:public BaceInfor		//系统服务信息
    {
        enum{
            SERNAME=0,
            PRONAME,
            DESCRIPTION,
            PATH,
            STATE,
            SIGN,
            STARTTYPE,
            DECISION,
            NUMS
        };
        /*
            SERNAME:        服务名称
            PRONAME:        进程名称
            DESCRIPTION:    服务描述
            PATH:          路径
            STATE:          服务状态
            SIGN:           签名情况
            STARTTYPE:      启动类型
            DECISION:       判定状态
        */
        QVector<QString> _infors;
        explicit SysServerInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct SysKernelInfor:public BaceInfor      //系统加载内核
    {
        enum{
            KERNELNAME=0,
            INSTALLTIME,
            DESCRIP,
            NUMS
        };
        /*
            KERNELNAME:     内核名称
            INSTALLTIME:    安装时间
            DESCRIP:        服务描述
        */
        QVector<QString> _infors;
        explicit SysKernelInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct EmailInfor:public BaceInfor          //邮件客户端
    {
        enum{
            NAME=0,
            VERSION,
            INSTALLTIME,
            PATH,
            SIZE,
            FREQUENCE,
            NUMS
        };
        /*
            NAME:           名称
            VERSION:        软件版本
            INSTALLTIME:    安装时间
            PATH:          安装路径
            SIZE:           软件大小
            FREQUENCE:      使用频率
        */
        QVector<QString> _infors;
        explicit EmailInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct VirMachine:public BaceInfor          //虚拟机安装
    {
        enum{
            ITEMS=0,
            INFORS,
            NUMS
        };
        /*
            ITEMS:          项目
            INFORS:         基本信息
        */
        QVector<QString> _infors;
        explicit VirMachine(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct DefendSoft:public BaceInfor          //杀毒软件防护
    {
        enum{
            COMPANY=0,
            NAME,
            VERSION,
            INSTALLTIME,
            UPDATETIME,
            DECISION,
            NUMS
        };
        /*
            COMPANY:        软件公司
            NAME:           软件名称
            VERSION:        软件版本
            INSTALLTIME:    安装时间
            UPDATETIME:     更新时间
            DECISION:       判定状态
        */
        QVector<QString> _infors;
        explicit DefendSoft(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct UserLoginInfor:public BaceInfor
    {
        enum{
            USER=0,
            TERMINER,
            IPADR,
            DATE,
            RUNTIME,
            RESULT,
            NUMS
        };
        /*
         * USER         用户信息
         * TERMINER     终端信息
         * IPADR        ip地址信息
         * DATE         日期
         * RUNTIME      持续时间
         * RESULT       0内部登录，１外部登录
        */
        QVector<QString> _infors;
        explicit UserLoginInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };
    struct WebHistoryInfor:public BaceInfor
    {
        enum{
            TITLE=0,
            URL,
            LOGNMS,
            LOGTIME,
            USER,
            NUMS
        };
        /*
        TITLE:		标题
        URL:		网址
        LOGNUMS:	访问次数
        LOGTIME:	最近一次访问时间
        */

        QVector<QString> _infors;
        explicit WebHistoryInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct WebCookiesInfor:public BaceInfor
    {
        enum{
            TIME=0,
            URL,
            PATH,
            NAME,
            USER,
            NUMS
        };
        /*
         * TIME:创建时间
         * URL:Cookies地址
         * PATH:保存路径
         * NAME:CookiesNAme
         * USER:用户
        */

        QVector<QString> _infors;
        explicit WebCookiesInfor(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct WebDownload:public BaceInfor
    {
        enum{
            FNAME=0,
            DPATH,
            STATIME,
            ENDTIME,
            SIZE,
            URL,
            TYPE,
            USER,
            NUMS
        };
        /*
         * FNAME        文件名称
         * DPATH        下载路劲
         * STATIME      下载开始时间
         * ENDTIME      下载结束时间
         * SIZE         文件大小
         * URL          下载地址
         * TYPE         下载文件的类型
        */
        QVector<QString> _infors;
        explicit WebDownload(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

    struct WebCollect:public BaceInfor
    {
        enum{
            URL=0,
            TITLE,
            DATE,
            USER,
            NUMS
        };
        /*
         * URL      网址
         * TITLE    网页标题
         * DATE     添加时间
        */
        QVector<QString> _infors;
        explicit WebCollect(uint16_t mcode,ToolCode tcode=ToolCode::Security);
    };

}

//文件检查
namespace Yzty
{
    //文件检查功能码
    enum class FileToolCode{
        FTOTAL=0,FKEY,FDOUBT,FOTHER,FILLEGAL,
        PTOTAL,PKEY,PDOUBT,POTHER,PILLEGAL,
        FILEOP,FILEPW,FILEEXTERN,
        NUMS
    };

    typedef int64_t WordLibCode;

    enum class WordCheckMethod{     //关键词的检查策略
        ANYWORD=0,ALLWORD,NOANYWORD
    };
    /*
     * ANYWORD      包含任意关键词
     * ALLWORD      包含全部关键词
     * NOANYWORD    不包含该类关键词
*/

    //时间限制
    struct TimeLimit
    {
        /*
         * Create  :创建时间限制
         * Modify  :修改时间限制
         * Create | Modify :两种限制都有
         * NoLimit :无时间限制
         */

        enum {Create=0x1,Modify=0x2,NoLimit=0x4};
        uint16_t        _model;
        QDateTime       _start_create_time;   //创建时间
        QDateTime       _end_create_time;
        QDateTime       _start_modify_time;   //修改时间
        QDateTime       _end_modify_time;
    };

    //文件大小限制
    struct SizeLimit
    {
        /*
        * Size: 有大小限制
        * NoLimit: 无大小限制
        */

        enum            {Size=0x1,NoLimit=0x2};
        uint16_t        _model;   //限制形式
        uint32_t        _lowlimit;   //下限
        uint32_t        _uplimit;    //上限　文件大小 2^32=4GB;
    };

    //文件路径限制
    struct DirLimit
    {
        QVector<QDir>   _dirs;    //搜索文件的范围
    };


    //文件格式限制
    struct FileTypeLimit
    {
        enum Type{
          TEXT=0x1,//文本

          HTML=0x2,XML=0x4,

          DOC=0x8,XLS=0x10,PPT=0x20,

          WPS=0x40,ET=0x80,DPS=0x100,

          ODT=0x200,ODS=0x400,ODP=0x800,

          JPG=0x1000,BMP=0x2000,PNG=0x4000,

          DOCX=0x8000,XLSX=0x10000,PPTX=0x20000,PDF=0x40000,

          RTF=0x80000,DOT=0x100000,PIG=0x200000,PSD=0x400000,RAW=0x800000,

          PPS=0x1000000,WPT=0x2000000,MHT=0X4000000,JPEG=0x8000000,DOTX=0x10000000,
          HTM=0x20000000
        };

        static QStringList TypeNames;

        quint64 _marks;   //类型掩码
    };

    //关键词库
    struct KeyWordLimit
    {
        WordLibCode _marks;   //关键词库掩码

        QMap<WordLibCode,WordCheckMethod> _methods; //每一类词对应的检查方法
    };


    //检查策略
    struct FileCheckMethod
    {
        enum {
          FILENAME=0x1,         //文件名检查
          FILECONTENT=0x2,      //文件内容
          FORWARDCONTENT=0x4,   //只检查前多少个字节
        };

        quint64 _marks;           //检查策略掩码
        uint32_t _wordlimits;     //字数限制
    };



    //筛选对话框的返回内容
    struct FileCheckCondition
    {
        TimeLimit         _timelimit;     //时间限制
        SizeLimit         _sizelimit;     //大小限制
        DirLimit          _dirlimit;      //路径限制
        FileTypeLimit     _typelimit;     //文件类型限制
        KeyWordLimit      _keywordlimit;  //关键词库限制
        FileCheckMethod   _checkmethod;   //检查策略
    };

    struct FileLevelPerson //密级初判人对话框信息
    {
        QString _levelper;      //判定人
        QString _remarks;       //备注
        QString _pwlevel;       //判定密级
    };

    //文件中命中关键字的位置
    struct FileKeyWordPos
    {
        uint16_t    _page;  //页
        uint16_t    _row;   //行
        uint16_t    _col;   //列
        qint64      _lib_id;        //词库id
        uint32_t    _keyword_id;    //关键词id
    };


    //文件检索记录
    struct FileCheckRecord:public BaceInfor
    {
        FileTypeLimit::Type         _type;          //文件类型
        uint32_t                    _file_id;       //文件路径索引
        QVector<FileKeyWordPos>     _key_pos;       //关键词对应的位置和id
        QString                     _hitSubstrings;
        bool                        _filename_flag;
        explicit FileCheckRecord(FileToolCode index,ToolCode tcode=ToolCode::File);
    };


    struct FileRecordInfor:public BaceInfor
    {
        QString                 _filetname;         //文件名
        QString                 _filetype;          //文件类型
        QString                 _filepath;          //文件路径
        QMap<WordLibCode,int>   _hits;              //在每一中关键词库的命中次数
        QString                 _filesize;          //文件大小
        QString                 _createtime;        //创建时间
        QString                 _lastmodifytime;    //修改时间
        QString                 _result;            //判定结果
        QString                 _pwlevel;           //文件密级
        QString                 _evaluator;         //评估人
        FileCheckRecord*        _filerecord;        //用于文本的显示，和关键词的赛选

        explicit FileRecordInfor(FileToolCode index,ToolCode tcode=ToolCode::File);
    };

}

namespace Yzty {
    enum class DeepToolCode{
        USB=0,              //USB设备记录
        NETHISTORY,         //上网历史
        FILLHISTORY,        //文件操作记录
        FILEDOC,            //文档文件
        WEBDOC,             //网页文件
        PICDOC,             //图像文件
        AUDIODOC,           //音频文件
        VEDIODOC,           //视频文件
        OTHERDOC,           //其他文件
        FJUDGEOTHER,        //判定其他文件
        FJUDGEINVAILD,      //判定违规文件
        HITCUTS,            //命中文件碎片
        HJUDGEOTHER,        //判定其他文件
        HJUDGEINVAILD,      //判定违规文件
        NUMS
    };

    struct UsbOperatorRecord:public BaceInfor{
        enum{
            Name=0,         //设备名
            Vendor,         //
            Series,         //序列号
            VID,
            PID,
            BeginT,
            EndT,
            Type,
            JugState,
            Jugilleg,
            Nums
        };
        QVector<QString>    _infors;

        explicit UsbOperatorRecord(Yzty::ITEMCODE mcode,Yzty::ToolCode code=ToolCode::Deep);

    };

    struct FileOperator:public BaceInfor{
        enum{
            FName=0,
            FPath,
            Oper,
            OpTime,
            FileState,
            Nums
        };

        QVector<QString> _infors;

        explicit FileOperator(Yzty::ITEMCODE mcode,Yzty::ToolCode code=ToolCode::Deep);
    };
}

namespace Yzty {
    enum class VirMachineToolCode{
        BACEINFOR=0,    //虚拟机基础信息
        FTOTAL,FKEY,FDOUBT,FOTHER,FILLEGAL,     //与文件检查一致
        PTOTAL,PKEY,PDOUBT,POTHER,PILLEGAL,
        PWFILELIST,
        NUMS
    };

    //获取虚拟机基础信息
    struct VirFileBaceInfor:public BaceInfor{
        enum{
            Name=0,
            Postion,
            Size,
            Date,
            Nums
        };
        QVector<QString> _infors;

        explicit VirFileBaceInfor(Yzty::ITEMCODE mcode,Yzty::ToolCode code=ToolCode::VirMachine);
    };

}

namespace Yzty {
    enum class EmailToolCode{
        EMAILIST=0,     //命中邮件列表
        JUGO,           //判定的其他邮件
        JUGU,           //判定的违规邮件
        PWSL,           //加密附件列表
        EXFMT,          //附件格式
        ResEmail,       //解析邮箱
        NUMS
    };

    //使用python解析后获得的基本信息
    struct EmailBaceInfor:public BaceInfor{
        enum{
            From=0,
            To,
            Cc,
            Subject,
            Message,
            Date,
            ContentType,
            ContentBase64,
            Nums
        };
        QVector<QString> _infors;

        explicit EmailBaceInfor(Yzty::ITEMCODE mcode,Yzty::ToolCode code=ToolCode::Email);
    };

    //命中邮件列表
    struct EmailHitInfor:public BaceInfor{
        enum{
            Account=0,
            Postion,
            Topic,
            Replyer,
            Poster,
            Date,
            ZTextH,
            FtextH,
            ESize,
            PType,
            Nums
        };
        QVector<QString>    _infors;

        explicit EmailHitInfor(Yzty::ITEMCODE mcode,Yzty::ToolCode code=ToolCode::Email);
    };

    //判定的其他邮件
    struct JugEmailOther:public BaceInfor{
        enum{
            Account=0,
            Postion,
            Topic,
            Replyer,
            Poster,
            Date,
            ZTextH,
            FtextH,
            ESize,
            PType,
            Nums
        };
        QVector<QString>    _infors;

        explicit JugEmailOther(Yzty::ITEMCODE mcode,Yzty::ToolCode code=ToolCode::Email);
    };

    //判定的违规邮件
    struct JugEmaililleg: public BaceInfor{
        enum{
            Account=0,
            Postion,
            Topic,
            Replyer,
            Poster,
            Date,
            ZTextH,
            FtextH,
            ESize,
            PType,
            Nums
        };
        QVector<QString>    _infors;

        explicit JugEmaililleg(Yzty::ITEMCODE mcode,Yzty::ToolCode code=ToolCode::Email);
    };

    //加密附件列表
    struct PWEmailExFile:public BaceInfor{
        enum{
            Account=0,
            ExFileName,
            Topic,
            Replyer,
            Poster,
            Date,
            ESize,
            PType,
            Nums
        };
        QVector<QString>    _infors;

        explicit PWEmailExFile(Yzty::ITEMCODE mcode,Yzty::ToolCode code=ToolCode::Email);
    };

    //附件格式
    struct PWEmailExFMT:public BaceInfor{
        enum{
            Account=0,
            ExFileName,
            Topic,
            Replyer,
            Poster,
            Date,
            ESize,
            PType,
            Nums
        };
        QVector<QString>    _infors;

        explicit PWEmailExFMT(Yzty::ITEMCODE mcode,Yzty::ToolCode code=ToolCode::Email);
    };
}

namespace Yzty {
    enum class ReportToolCode{
//        USB=0,              //USB设备记录
//        NETHISTORY,         //上网历史
//        FILLHISTORY,        //文件操作记录
//        FILEDOC,            //文档文件
//        WEBDOC,             //网页文件
//        PICDOC,             //图像文件
//        AUDIODOC,           //音频文件
//        VEDIODOC,           //视频文件
//        OTHERDOC,           //其他文件
//        FJUDGEOTHER,        //判定其他文件
//        FJUDGEINVAILD,      //判定违规文件
//        HITCUTS,            //命中文件碎片
//        HJUDGEOTHER,        //判定其他文件
//        HJUDGEINVAILD,      //判定违规文件
        QRcodereport,
        Xmlreport,
        FileGenreport,
        Fileillegalreport,
        Filedetailreport,
        Genralreport,
        Illegalreport,
        Detailreport,
        NUMS
    };
}

namespace Yzty {
    QMap<QString,QString> SerializaShellInput(const QString& command,int& items);


    enum class HardToolCode
    {
        Cpu=0,          //cpu信息
        MotherBoard,    //主板信息
        Memory,         //内存信息
        GraphCard,      //显卡信息
        SoundCard,      //声卡信息
        HardDisk,       //硬盘信息
        Battery,        //电池信息
        BlueTooth,      //蓝牙信息
        NetCard,        //网卡信息
        Mouse,          //鼠标
        KeyBoard,       //键盘
       // PrintDevice,    //打印机
        OsAndHost,      //操作系统和主机信息
        User,           //用户信息
      //  IpAddres,       //ip地址信息
       // SoftLists,      //软件列表
        NUMS
    };

    typedef struct cpuInfor:public BaceInfor
    {
        //命令行读取字段
        static QString ProductName;
        static QString Vendor;
        static QString Model;
        static QString CpuMHz;
        static QString BogoMips;
        static QString CoreId;
        static QString Cores;
        static QString processor;

        //输出字段
        static QStringList keywords;

        QString 		_prodname;		//名称
        QString 		_vendorname;    //制造商名称
        QString			_arch;			//架构
        QString         _end;           //端信息
        QString			_model;			//型号
        QString         _wordsize;      //字长
        QString 		_coreid;		//核心id
        QString 		_procid;		//处理器id
        QString         _cores;         //核心数
        QString	 		_fmhz;			//频率
        QString			_mips;			//MIPS

        explicit cpuInfor(uint16_t index,ToolCode code=ToolCode::Hard);
        virtual QString& GetItem(int itemindex);
    }cpuInfor;

    //bios信息
    typedef struct biosInfor
    {
        //命令行读取字段
        static QString Vendor;
        static QString Version;
        static QString RuntimeSize;
        static QString ROMSize;
        static QString Features;

        //输出字段
        static QStringList keywords;

        QString			_vendorname;	//制造商名称
        QString			_version;		//版本
        QString			_feature;		//特性
        QString			_rom;			//rom大小
        QString			_runmemor;		//运行内存大小

        QString& GetItem(int itemindex);
    }biosInfor;

    //主板上内存插槽信息
    typedef struct mesoltInfor
    {
        //命令行读取字段
        static QString Postion;
        static QString MaxCapacity;
        static QString NumDevice;

        //输出字段
        static QStringList keywords;

        /* data */
        QString			_pos;			//插槽位置
        QString         _solts;			//卡槽数量
        QString         _mgb;			//最大内存容量

        QString& GetItem(int itemindex);
    }mesoltInfor;

    //主板Infor
    typedef struct moboInfor:public BaceInfor
    {
        //命令行字段
        static QString Vendor; //="Manufacturer";
        static QString ProductName;
        static QString Version;
        static QString SerialNumber;
        static QString Type;
        static QString Feature;

        //输出字段
        static QStringList keywords;

        QString 		_vendorame;     //制造商名称
        QString         _prodname;      //产品名称
        QString			_version;		//版本
        QString			_feature;		//特征
        QString			_model;			//类型
        QString			_serialnum;		//序列号
        biosInfor		_bios;			//bios信息
        mesoltInfor     _msolts;        //内存插槽信息

        explicit moboInfor(uint16_t index,ToolCode code=ToolCode::Hard);
        QString& GetItem(int itemindex);
    }moboInfor;

    //内存条信息
    typedef struct memoryInfor:public BaceInfor
    {
        //命令行字段
        static QString Vendor;
        static QString ProductName;
        static QString Type;
        static QString SoltType;
        static QString SerialNumber;
        static QString MemorySize;
        static QString DataWidth;
        static QString Speed;
        static QString Mhz;

        //输出字段
        static QStringList keywords;

        QString			_prodname;		//名称
        QString			_vendorname;	//制造商mingc
        QString			_model;			//型号
        QString			_slottype;		//插槽类型
        QString			_serialnum;		//序列号
        QString         _speed;         //速度
        QString         _mhz;           //频率
        QString         _mgb;			//内存大小
        QString         _dataw;			//数据位宽
        explicit memoryInfor(uint16_t index,ToolCode code=ToolCode::Hard);

        virtual QString& GetItem(int itemindex) override;

    }memoryInfor;

    //显卡信息
    typedef struct graphcardInfor:public BaceInfor
    {
        //命令行输出
        static QString ProductName;
        static QString Vendor;
        static QString Descript;
        static QString Version;
        static QString Ability;
        static QString MHz;
        static QString DataWidth;
        static QString CurReslution;
        static QString MinReslution;
        static QString MaxReslution;
        static QString Model;
        static QString Drive;
        static QString Config;
        static QString Interface;
        static QString IoPort;


        //输出字段
        static QStringList keywords;


        QString			_prodname;			//名称
        QString			_vendorname;		//制造商名称
        QString			_model;             //型号
        QString			_version;           //版本
        QString         _ability;           //功能
        //uint16_t		_mgb;               //显存大小
        QString         _description;       //描述
        QString         _driver;            //驱动模块
        QString         _config;            //配置信息
        QString         _interface;         //接口
        QString         _mhz;               //频率
        QString         _dataw;             //数据位宽
        QString         _curslt;            //当前分辨率	0xffff0000	* 0x0000ffff
        QString         _minslt;            //最小分辨率
        QString         _maxslt;            //最大分辨率
        QString         _ioport;            //io端口
        explicit graphcardInfor(uint16_t index,ToolCode code=ToolCode::Hard);

        virtual QString& GetItem(int itemindex);
    }graphcardInfor;

    //网卡信息
    typedef struct networkcardInfor:public BaceInfor
    {
        static QString ProductName;
        static QString Vendor;
        static QString Type;
        static QString Version;
        static QString Ability;
        static QString DataWidth;
        static QString Config;
        static QString Mhz;
        static QString Resource;
        static QString Serial;
        static QString logicalname;

        static QStringList keywords;

        /* data */
        QString			_prodname;			//名称
        QString			_vendorbname;		//制造商名称
        QString			_model;             //类型
        QString			_version;           //版本
        QString			_ability;           //功能描述
        QString         _config;            //配置信息
        QString         _mhz;               //频率
        QString         _dataw;             //数据位宽
        QString         _resource;          //资源
        QString         _Serial;            //序列号
        QString         _logicalname;       //逻辑名称

        explicit networkcardInfor(uint16_t index,ToolCode code=ToolCode::Hard);
        virtual QString& GetItem(int itemindex) override;

    }networkcardInfor;

    //硬盘信息
    typedef struct diskInfor:public BaceInfor
    {
        static QString  ProductName;
        static QString  Vendor;
        static QString  Medium;
        static QString  Interface;
        static QString  Serialnum;
        static QString  Driver;
        static QString  DeviceFile;
        static QString  Config;
        static QString  Hwclass;
        static QString  Size;

        static QStringList keywords;

        /* data */
        QString			_prodname;			//名称
        QString			_vendorname;		//制造商名称
        QString         _medium;            //介质
        QString         _interface;         //接口
        QString			_serialnum;         //序列号
        QString         _driver;            //驱动模块
        QString         _devicefiles;       //驱动文件
        QString         _config;            //配置信息
        QString         _hwclass;           //硬件类型
        QString         _mgb;               //大小    G
        explicit diskInfor(uint16_t index,ToolCode code=ToolCode::Hard);
        virtual QString& GetItem(int itemindex) override;
    }diskInfor;

    //蓝牙信息
    typedef struct bluetoothInfor:public BaceInfor
    {
        static QString  ProductName;
        static QString  Vendor;
        static QString  Interface;
        static QString  Driver;
        static QString  Config;
        static QString  Hwclass;
        static QString  Speed;

        static QStringList keywords;

        QString         _prodname;          //产品名称
        QString         _vendorname;        //制造商名称
        QString         _driver;            //驱动
        QString         _interface;         //接口
        QString         _spped;             //带宽
        QString         _hwclass;           //硬件类型
        QString         _config;            //配置信息
        explicit bluetoothInfor(uint16_t index,ToolCode code=ToolCode::Hard);
        virtual QString& GetItem(int itemindex) override;
    }bluetoothInfor;

    //键盘信息
    typedef struct keyboardInfor:public BaceInfor
    {
        static QString ProductName;
        static QString Vendor;
        static QString Type;
        static QString Interface;
        static QString Hwclass;
        static QString Config;

        static QStringList keywords;

        QString         _probname;          //名称
        QString         _vendorname;        //制造商名称
        QString         _model;             //型号
        QString         _interface;         //接口
        QString         _hwclass;           //硬件类别
        QString         _config;            //配置信息
        explicit keyboardInfor(uint16_t index,ToolCode code=ToolCode::Hard);
        virtual QString& GetItem(int itemindex);
    }keyboardInfor;

    //声卡信息
    typedef struct soundcardInfor:public BaceInfor
    {
        static QString ProductName;
        static QString Vendor;
        static QString Type;
        static QString Version;
        static QString Ability;
        static QString Config;
        static QString Mhz;
        static QString DataWidth;

        static QStringList keywords;

        QString     _probname;          //名称
        QString     _vendorname;        //制造商名称
        QString     _model;             //型号
        QString     _version;           //版本        UsbDevice
        QString     _ability;           //功能
        QString     _config;            //配置
        QString     _mhz;               //时钟频率
        QString     _dataw;             //位宽

        explicit soundcardInfor(uint16_t index,ToolCode code=ToolCode::Hard);
        virtual QString& GetItem(int itemindex);
    }soundcardInfor;

    //电池
    typedef struct batteryInfor:public BaceInfor
    {
        static QString  ProductName;
        static QString  Vendor;
        static QString  Version;
        static QString  SerialNum;
        static QString  UpdateTime;
        static QString  State;
        static QString  Energy;
        static QString  FullEnergy;
        static QString  DesihmFullEnergy;
        static QString  RateEnergy;
        static QString  Volatage;
        static QString  Percentage;
        static QString  Capacity;

        static QStringList keywords;

        QString     _probname;          //名称
        QString     _vendorname;        //制造商
        QString     _serialnum;         //序列号
        QString     _updatedtime;       //信息更新时间
        QString     _state;             //当前电池状态
        QString     _cur_energy;        //当前能量  Wh
        QString     _energy_full;       //完全充满时的能量 Wh
        QString     _energy_full_desgin;//设计总容量 Wh
        QString     _energy_rate;       //能量密度 W
        QString     _voltage;           //电压
        QString     _percentage;        //百分比
        QString     _capacity;          //容量

        explicit batteryInfor(uint16_t index,ToolCode code=ToolCode::Hard);
        virtual QString& GetItem(int itemindex);
    }batteryInfor;

    //鼠标信息
    typedef struct mouseInfor:public BaceInfor
    {

        static QString ProductName;
        static QString Vendor;
        static QString Type;
        static QString Interface;
        static QString Hwclass;
        static QString Config;

        static QStringList keywords;

        QString      _probname;             //名称
        QString      _vendorname;           //制造商名称
        QString      _model;                //型号
        QString      _interface;            //接口
        QString      _hwclass;              //硬件类别
        QString      _config;               //配置信息
        explicit mouseInfor(uint16_t index,ToolCode code=ToolCode::Hard);
        virtual QString& GetItem(int itemindex);
    }mouseInfor;

    //系统和主机信息
    typedef struct osInfor:public BaceInfor
    {
        static QString  Machinename;
        static QString  Vendor;
        static QString  UUID;

        static QStringList keywords;

        QString     _machinename;           //机器名称
        QString     _vendor;                //制造商
        QString     _osname;                //产品名称
        QString     _osversion;             //版本
        QString     _ostype;                //系统类型
        QString     _kerneltype;            //内核类型
        QString     _kernelversion;         //内核版本
        QString     _cpuinfor;              //处理器信息
        QString     _UUID;                  //UUID

        explicit osInfor(uint16_t index,ToolCode code=ToolCode::Hard);
        virtual QString& GetItem(int itemindex) override;
    }osInfor;

    //账户信息
    typedef struct userInfor: public BaceInfor
    {

        static int Uname;
        static int Tty;
        static int Logtime;
        static int Pcpu;
        static int What;


        //输出信息
        static QStringList keywords;

        QString     _username;          //用户名
        QString     _tty;               //终端号
        QString     _logtime;           //登陆时间
        QString     _pcpu;              //当前进程执行时间
        QString     _what;              //当前执行进程
        QStringList _log;               //开关机记录

        explicit userInfor(uint16_t index,ToolCode code=ToolCode::Hard);
        QString& GetItem(int itemindex);
    }userInfor;

    //IP信息
    typedef struct ipInfor: public BaceInfor
    {
        uint32_t    _ipv4;         //IPV4地址
        uint32_t    _upv6;         //IPV6地址
        uint32_t    _netmask;      //子网掩码
        explicit ipInfor(uint16_t index,ToolCode code=ToolCode::Hard);
    }ipInfor;
    /*******************************************************************/
}
namespace Yzty//报告
{
    typedef struct CheckItems
    {
        QString CheckItem;              //检查项
        QString Description;            //描述
        QString CheckResult;            //检查结果
        CheckItems(QString x="",QString y="",QString z=""):CheckItem(x),Description(y),CheckResult(z){}
    }CheckItems;
    typedef struct
    {
        QString check_unit;             //检查单位
        QString region;                 //区域
        QString be_check_unit;          //被检查单位
        QString be_check_peo;           //被检查人员
        QString type;                   //类型
        QString check_peo;              //检查人
        QString check_time;             //检查时间
        QString be_check_sec;           //检查部门
        QString host_type;              //主机类型
        QString host_model;
        QString host_name;
        QString cpu;
        QString os;
        QString mainharddisk;
        QString ip;
        QString irrgular_storage;
        QString standard_storage;
        QString determine_result;
        QString levelpc;
        QString filecheckpath;          //检查路径
        QString filechecknum;           //检查文件数
    }Maininfor;

    typedef struct GeneralReport
    {
        enum
        {
            basic_os=0,             //安装多操作系统
            basic_reinstall,        //操作系统重装
            basic_harddisk,         //硬盘最近更换
            basic_partition,        //加密隐藏分区
            basic_poweronpwd,       //开机密码设置
            basic_screensaver,      //屏幕保护设置
            basic_command,          //弱口令检查
            basic_macadd,           //MAC地址修改
            basic_wirelesscom,      //无线通讯
            basic_audiovideo,       //音频视频
            usb_phone,              //手机插拔记录
            usb_comstorage,         //常规存储设备
            usb_bluetooth,          //无线蓝牙红外
            usb_otherUSB,           //其他USB设备
            net_browser,            //浏览器联网记录
            net_app,                //软件联网记录
            net_cookies,            //Cookies记录
            net_favorite,           //收藏夹记录
            app_systemapp,          //系统软件
            sec_telnet,             //远程登录检查
            sec_update,             //系统升级文件
            sec_antivirus,          //杀毒软件安装
            file_keyword,           //密级关键词命中
            file_suspected,         //疑似标密文件
            file_secret,            //密标文件
            file_other,             //判定的其他文件
            file_illegal,           //判定的违规文件
            img_keyword,            //密级关键词命中
            img_suspected,          //疑似标密文件
            img_secret,             //密标文件
            img_other,              //判定的其他图片
            img_illegal,            //判定的违规图片
            NUMS
        };
        QVector<CheckItems> item;
    }GeneralReport;

    typedef struct fileReportinfor {
        QString FileName;           //文件名
        QString Path;               //文件路径
        QString SLevel;             //判定密级
        QString Result;             //判定结果
        QString Key;                //命中关键字
        QString Infor;              //摘要信息
        fileReportinfor(QString i1="", QString i2="", QString i3="", QString i4="", QString i5="", QString i6=""):FileName(i1),Path(i2),SLevel(i3),Result(i4),Key(i5),Infor(i6){}
    }fileReportinfor;

//以下为xml报告输出字段
    typedef struct XmlBaceInfo {
        virtual int GetSize();
        virtual QString GetInfor(int i);
        virtual QString GetKeyWords(int i);
        virtual QString GetDefaultInfo(int i);
    }XmlBaceInfo;
    typedef struct HostInfo:public XmlBaceInfo {
        enum {
            OSVersion=0,
            InstallTime,
            HostName,
            Type,
            Description,
            Xxx,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        HostInfo():_infor(int(NUMS)){}
    }HostInfo;

    typedef struct AccountInfo:public XmlBaceInfo {
        enum{
            CurrentUser=0,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        AccountInfo():_infor(int(NUMS)){}
    }AccountInfo;

    typedef struct NetWorkInfo:public XmlBaceInfo {
        enum{
            IP=0,
            Mac,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        NetWorkInfo():_infor(int(NUMS)){}
    }NetWorkInfo;

    typedef struct HardDiskInfo:public XmlBaceInfo {
        enum{
            Company=0,
            Product,
            SN,
            TotalDiskSpace,
            Detail,
            BootTimes,
            Using,
            Status,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        HardDiskInfo():_infor(int(NUMS)){}
    }HardDiskInfo;

    typedef struct FastUSBRecord:public XmlBaceInfo {
        enum{
            Type=0,
            DeviceName,
            SN,
            VID,
            PID,
            FirstDate,
            LastDate,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        FastUSBRecord():_infor(int(NUMS)){}
    }FastUSBRecord;

    typedef struct DeepUSBRecord:public XmlBaceInfo {
        enum{
            Type=0,
            DeviceName,
            SN,
            VID,
            PID,
            FirstDate,
            LastDate,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        DeepUSBRecord():_infor(int(NUMS)){}
    }DeepUSBRecord;

    typedef struct FastInternetRecord:public XmlBaceInfo {
        enum {
            Date=0,
            Name,
            Process,
            Deduction,
            Xxx,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        FastInternetRecord():_infor(int(NUMS)){}
    }FastInternetRecord;

    typedef struct DeepInternetRecord:public XmlBaceInfo {
        enum {
            Date=0,
            Name,
            Process,
            Deduction,
            Xxx,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        DeepInternetRecord():_infor(int(NUMS)){}
    }DeepInternetRecord;

    typedef struct FastFileCheck:public XmlBaceInfo {
        enum{
            FileName=0,
            FilePath,
            FileSize,
            ModifyDate,
            CreateDate,
            KeywordHit,
            KeyAbstract,
            Application,
            Deduction,
            JudgedMan,
            JudgedRemark,
            Level,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        FastFileCheck():_infor(int(NUMS)){}
    }FastFileCheck;

    typedef struct DeepFileCheck:public XmlBaceInfo {
        enum {
        FileName=0,
            FilePath,
            FileSize,
            ModifyDate,
            CreateDate,
            KeywordHit,
            Application,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        DeepFileCheck():_infor(int(NUMS)){}
    }DeepFileCheck;

    typedef struct ShareFile:public XmlBaceInfo {
        enum{
            Name=0,
            Path,
            Authority,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;

        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        ShareFile():_infor(int(NUMS)){}
    }ShareFile;

    typedef struct SystemPatch:public XmlBaceInfo {
        enum{
            ID=0,
            Description,
            VulDescription,
            Date,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        SystemPatch():_infor(int(NUMS)){}
    }SystemPatch;

    typedef struct OSInstallation:public XmlBaceInfo {
        enum{
            Name=0,
            Version,
            InstallPath,
            InstallDate,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        OSInstallation():_infor(int(NUMS)){}
    }OSInstallation;

    typedef struct Antivirus:public XmlBaceInfo {
        enum {
            Name = 0,
            Version,
            UpdateDate,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        Antivirus():_infor(int(NUMS)){}
    }Antivirus;

    typedef struct SWInstall:public XmlBaceInfo {
        enum{
            Name=0,
            Company,
            InstallTime,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        SWInstall():_infor(int(NUMS)){}
    }SWInstall;

    typedef struct SpecialDefense:public XmlBaceInfo {
        enum{
            Name = 0,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        SpecialDefense():_infor(int(NUMS)){}
    }SpecialDefense;

    typedef struct WirelessDevice:public XmlBaceInfo {
        enum {
                Name =0,
                Company,
                Description,
                Type,
                Deduction,
                NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        WirelessDevice():_infor(int(NUMS)){}
    }WirelessDevice;

    typedef struct VirtualMachine:public XmlBaceInfo {
        enum{
            Name=0,
            Version,
            Company,
            InstallPath,
            InstallDate,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        VirtualMachine():_infor(int(NUMS)){}
    }VirtualMachine;

    typedef struct AccountStrategy:public XmlBaceInfo {
        enum{
            MinPasswordLength = 0,
            MaxValidityPeriod,
            MinValidityPeriod,
            PasswordHistory,
            LockTime,
            RestCounter,
            GuestStatus,
            AutoLogon,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        AccountStrategy():_infor(int(NUMS)){}
    }AccountStrategy;

    typedef struct AccountSetting:public XmlBaceInfo {
        enum {
            UserName=0,
            PasswordPrompt,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        AccountSetting():_infor(int(NUMS)){}
    }AccountSetting;

    typedef struct AuditStrategy:public XmlBaceInfo {
        enum{
            Modify = 0,
            Login,
            Object,
            Process,
            AD,
            SpecialUse,
            Event,
            LoginOther,
            Account,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        AuditStrategy():_infor(int(NUMS)){}
    }AuditStrategy;

    typedef struct AccountPermissionSetting:public XmlBaceInfo {
        enum{
            UserName = 0,
            PermissionPrompt,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        AccountPermissionSetting():_infor(int(NUMS)){}
    }AccountPermissionSetting;

    typedef struct Services:public XmlBaceInfo {
        enum{
            ServiceName = 0,
            PID,
            PName,
            Description,
            Path,
            Status,
            Signature,
            Auto,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        Services():_infor(int(NUMS)){}
    }Services;

    typedef struct Ports:public XmlBaceInfo {
        enum{
            Port = 0,
            Protocol,
            LocalIP,
            RemoteIP,
            Status,
            PID,
            PName,
            Deduction,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        Ports():_infor(int(NUMS)){}
    }Ports;

    typedef struct EmailCheck:public XmlBaceInfo {
        enum{
            attach = 0,
            AccountName,
            EmailPosition,
            EmailTitle,
            EmailRecipient,
            EmailSender,
            EmailDate,
            EmailSize,
            NUMS
        };
        static QStringList Keywords;
        static QStringList defaultinfo;
        QVector<QString> _infor;
        int GetSize() override;
        QString GetInfor(int i) override;
        QString GetKeyWords(int i) override;
        QString GetDefaultInfo(int i) override;
        EmailCheck():_infor(int(NUMS)){}
    }EmailCheck;

}

#endif // MYTYPES_H
